

/************************************************************************************/
/*                                                                                  */ 
/* Compute number of granted cases in our data and compare with official statistics */
/*                                                                                  */ 
/************************************************************************************/



libname raw 'G:\Data\Rawdata\707677';

libname stats 'G:\Data\Rawdata\707677\Eksterne data'; 

libname common 'G:\Data\Workdata\707677\Common\01Data\01SAS';





/*******************/
/* Load our sample */
/*******************/



data list;

set common.list;

keep pnr granted pyear kdate_first;

run;



/**************************/
/* Mark year for decision */
/**************************/


data list;

set list;

kyear=year(kdate_first);

run;



/* Sum number of granted cases in our data over period 1988 to 2003 */


proc summary data=list;

output out=stats

sum(granted)=decisions;

where kyear>1987 and kyear<2004;

run;



data stats;

set stats;

drop _type_ _freq_;

run;



/* Number of granted cases 1988 to 2003 according to official statistics */



data stats;

set stats;

official=32565;

run;




data stats;

set stats;

ratio=ROUND(decisions/official,0.001);

run;

